package com.designpattern.factory.simple;

import com.designpattern.strategy.symbol.*;

public class CalFactory {

    public static Symbol cal(int sym) {

        switch (sym) {
            case 1:
                return new Add();
            case 2:
                return new Reduction();
            case 3:
                return new Multiply();
            case 4:
                return new Divide();
            default:
                return null;
        }
    }
}
